﻿// MIT License
// 开源地址：https://gitee.com/co1024/AbcMvc
// Copyright (c) 2021-2023 1024
// Abc.Mvc=Furion+EF+SqlSugar+Pear layui admin.

namespace Abc.Core.Entities;

/// <summary>
///     邮件发送配置
/// </summary>
[Comment("邮件发送配置")]
[Table("Sys_EmailSendConfig")]
public class EmailSendConfig : EFFullEntity, IEntityTypeBuilder<EmailSendConfig>
{
    /// <summary>
    ///     Json数据 <see cref="Dictionary<string, object>"/>
    /// </summary>
    [Comment("Json数据")]
    public string ExtensionData { get; set; }

    /// <summary>
    ///     是否启用
    /// </summary>
    [Comment("是否启用")]
    public bool IsEnable { get; set; }

    /// <summary>
    ///     SMTP服务器
    /// </summary>
    [Comment("SMTP服务器")]
    public string EmailSmtpHost { get; set; }

    /// <summary>
    ///     邮件服务器Smtp端口
    /// </summary>
    [Comment("邮件服务器Smtp端口")]
    public string EmailSmtpPort { get; set; }

    /// <summary>
    ///     邮箱账号
    /// </summary>
    [Comment("邮箱账号")]
    public string EmailAccount { get; set; }

    /// <summary>
    ///     邮箱密码
    /// </summary>
    [Comment("邮箱密码")]
    public string EmailPassword { get; set; }

    /// <summary>
    ///     是否包含Html代码
    /// </summary>
    [Comment("是否包含Html代码")]
    public bool EmailIsHtml { get; set; }

    /// <summary>
    ///     发送者显示名
    /// </summary>
    [Comment("发送者显示名")]
    public string EmailDisplayName { get; set; }

    /// <summary>
    ///     是否启用SSL加密
    /// </summary>
    [Comment("是否启用SSL加密")]
    public bool EmailIsSsl { get; set; }

    /// <summary>
    ///     备注
    /// </summary>
    [Comment("备注")]
    public string Remark { get; set; }

    public void Configure(EntityTypeBuilder<EmailSendConfig> entityBuilder, DbContext dbContext, Type dbContextLocator)
    {
    }
}